// vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import postcssImport from 'postcss-import'
import autoprefixer from 'autoprefixer'
import postCssPxToRem from 'postcss-pxtorem'
import tailwindcss from '@tailwindcss/postcss'
export default defineConfig({
  plugins: [react()],
  css: {
    postcss: {
      plugins: [
        postcssImport(),
        tailwindcss(),
        autoprefixer,
        postCssPxToRem({
          rootValue: 37.5,
          propList: ['*', '!height'],
          selectorBlackList: [],
          replace: true,
          mediaQuery: true,
          minPixelValue: 2,
          exclude: /node_modules/i
        })
      ]
    }
  },
  server:{
    open:true
  }
})